package com.xyz.dao.logic;

import com.free.ext.mybatis.model.entity.PageResponseModel;
import com.xyz.dao.dao.OGamestatisruleDao;
import com.xyz.domain.table.OGamestatisrule;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import java.util.List;

@Component
public class OGamestatisruleLogic {

    @Autowired
    private OGamestatisruleDao oGamestatisruleDao;

    public OGamestatisrule add(OGamestatisrule oGamestatisrule){
        return oGamestatisruleDao.insert(oGamestatisrule);
    }

    public Integer update(OGamestatisrule oGamestatisrule){
        return oGamestatisruleDao.update(oGamestatisrule);
    }

    public List<OGamestatisrule> list(OGamestatisrule oGamestatisrule, String orderBy){
        return oGamestatisruleDao.selectList(oGamestatisrule, orderBy);
    }

    public Integer delete(Integer key){
        return oGamestatisruleDao.delete(key);
    }

    public PageResponseModel<OGamestatisrule> pageInfo(OGamestatisrule oGamestatisrule, String orderBy, Integer pageNo, Integer pageSize){
        return oGamestatisruleDao.selectByPageNo(oGamestatisrule, orderBy, pageNo, pageSize);
    }

}